<?php
$oldArray = ['Yii', 'PHP', 'laravel'];
$newArray = ['Java','PHP'];

/*$rs = array_diff($oldArray, $newArray);
var_dump($rs);
$rs = array_diff($newArray, $oldArray);
var_dump($rs);*/
//echo strip_tags("Hello <b><i>world!</i></b>","<b>");//剥去字符串中的 HTML 标签，但允许使用 <b> 标签：
//字符串压缩举例
$string = 'http://www. is php technical website.This website is personal website.php8848.com has many php and mysql or other IT knowledage articles,so welcome to php8848.com!please enjoy it! it’s our honor if php8848 can help you !';
$compressed = gzcompress($string);
echo 'Original size: '. mb_strlen($string) .'<br/>'; //Original size: 200
echo 'Compressed size: '. mb_strlen($compressed) .'<br/>';//Compressed size: 126
$original = gzuncompress($compressed); //这种操作的压缩率能达到 50% 左右。

// 2.
$gzencode = gzencode($string);
echo 'Gzencode size: ' . mb_strlen($gzencode) .'<br/>';
echo 'Gzencode size: ' . mb_strlen($gzencode) .'<br/>'; //Gzencode size: 137


